﻿<%@ Page Language="C#"  MasterPageFile="~/MasterPage.master" AutoEventWireup="true" 
Inherits="Nivdal.TeamFutureMatches" Title="" Theme="SkinFile" Codebehind="TeamFutureMatches.aspx.cs" %>

<%@ Register Assembly="obout_Flyout2_NET" Namespace="OboutInc.Flyout2" TagPrefix="cc1" %>

<asp:Content ID="PageNameContent" ContentPlaceHolderID="PageNamePlaceHolder" runat="server">
    <asp:LinkButton ID="TeamNameInTitleLinkButton" runat="server" CssClass="PageNameContentStyle"></asp:LinkButton>
    <asp:Label ID="PageNameLabel" runat="server" Text="<%$ Resources:Resource, TeamFutureMatches_PageNameLabel %>" CssClass="PageNameContentStyle"></asp:Label>
</asp:Content>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <asp:HiddenField ID="IsNationalTeamHiddenField" runat="server" />
    <div class="basic_element">
    <div class="red_title">
       <asp:LinkButton ID="TeamNameLinkButton" runat="server" CssClass="white_title"></asp:LinkButton>
       <asp:Label ID="FutureMatchesLabel" runat="server" Text="<%$ Resources:Resource, TeamFutureMatches_FutureMatchesLabel %>" CssClass="white_title"></asp:Label>
    
    </div>
    <div class="padding5">
        <asp:Label ID="ConfirmNote" runat="server" Text=""></asp:Label>
        <br />
         <asp:GridView ID="UpcomingMatchesGridView" runat="server" DataSourceID="UpcomingMatchesSqlDataSource"
            SkinID="Professional" OnRowCommand="UpcomingMatchesGridView_RowCommand" AutoGenerateColumns="False"
            OnRowCreated="UpcomingMatchesGridView_OnRowCreated" EnableTheming="True">
            <Columns>
                <asp:BoundField DataField="MatchId" Visible="true" />
                <asp:TemplateField HeaderText="<%$ Resources:Resource, Global_Time %>" ItemStyle-Width="20%">
                    <ItemTemplate>
                        <asp:Label ID="TimeLabel" runat="server" Text='<%# Eval("Time")%>' SkinID="GridLabel"> </asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField ItemStyle-Width="4%">
                    <ItemTemplate>
                        <asp:Image ID="MatchTypeImage" runat="server" ImageUrl='<%# GetNivdalData.GetNivdalData.GetIconByMatchType(Eval("Type")) %>' 
                         ToolTip='<%# GetNivdalData.GetNivdalData.GetToolTipByMatchType(Eval("Type")) %>'/>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField ItemStyle-Width="36%">
                    <ItemTemplate>
                        <asp:HyperLink ID="TitleHyperLink" runat="server" Text='<%# Eval("Title") %>' NavigateUrl='<%# Eval("MatchId", "MatchPage.aspx?MatchId={0}") %>'
                            SkinID="BlackHyperLinkSkin"></asp:HyperLink>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField ItemStyle-Width="32%">
                    <HeaderTemplate>
                        <asp:Label ID="StadiumNameTitleLabel" runat="server" Text="<%$ Resources:Resource, Global_Stadium %>"></asp:Label>
                    </HeaderTemplate>
                    <ItemTemplate>
                        <asp:HyperLink ID="StadiumNameHyperLink" runat="server" Text='<%# Eval("StadiumName") %>'
                            NavigateUrl='<%# Eval("StadiumId", "StadiumPage.aspx?StadiumId={0}") %>' SkinID="BlackHyperLinkSkin"></asp:HyperLink>
                        <br />
                        <asp:Panel ID="StadiumAssignmentPanel" runat="server" Visible='<%# IsStadiumAsignment(Eval("StadiumAsignment"))%>'>                        
                            <asp:DropDownList ID="StadiumsDropDownList" Enabled="True" Width="160"
                                AppendDataBoundItems="true" DataSourceID="ShowStadiumsValuesSqlDataSource" DataTextField="StadiumName"
                                DataValueField="StadiumId" runat="server">
                            </asp:DropDownList>
                            <asp:Image ID="StadiumCostsImage" runat="server" ImageUrl="~/Images/question.gif" />
                            <asp:ImageButton ID="AssignStadiumImageButton" runat="server" message="<%$ Resources:Resource, AreYouSure %>"
                            OnClientClick='return confirm(this.getAttribute("message"))'
                            CommandArgument="<%#((GridViewRow) Container).RowIndex %>" CommandName="AssignStadium"
                            ToolTip="<%$ Resources:Resource, Global_AssignStadium %>" ImageUrl="~/Images/Icons/vi.png" />
                            <cc1:Flyout ID="StadiumCostsFlyout" runat="server" AttachTo="StadiumCostsImage" NoneEffect="true" Position="BOTTOM_CENTER">
                                <div class="ToolTipStyle" style="width:300px;">
                                    <asp:Label ID="StadiumCostsTitleLabel" runat="server" SkinID="InfoLabel"
                                     Text="<%$ Resources:Resource, ListOfTeamMatches_StadiumCostsTitleLabelText %>"></asp:Label>
                                     <br />
                                    <asp:GridView ID="StadiumsCostGridView" runat="server" DataSourceID="StadiumsCostSQLDataSourse"
                                     SkinID="Professional" AllowPaging="false" AutoGenerateColumns="false">
                                        <Columns>
                                            <asp:TemplateField>
                                                <ItemTemplate>
                                                   <asp:Label ID="StadiumNameLabel" runat="server" Text='<%# Eval("Name") %>' SkinID="InfoLabel"></asp:Label> 
                                                </ItemTemplate>
                                            </asp:TemplateField>
                                            <asp:TemplateField>
                                                <ItemTemplate>
                                                    <asp:Label ID="StadiumCostLabel" runat="server" Text='<%# Eval("Cost") %>'></asp:Label>
                                                    <asp:Image ID="AtukImage" runat="server" ImageUrl="~/Images/Icons/atuk.png"
                                                     ToolTip="<%$ Resources:Resource, Atuks %>"/>
                                                </ItemTemplate>
                                            </asp:TemplateField>
                                        </Columns>
                                    </asp:GridView>
                                </div>                        
                            </cc1:Flyout>
                        
                        </asp:Panel>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField ItemStyle-Width="4%">
                    <ItemTemplate>
                        <%--<asp:ImageButton ID="AssignInstructionsLinkButton" runat="server" 
                        ImageUrl='<%# Eval("InstructionIconName", "~/Images/Icons/{0}") %>' 
                        PostBackUrl='<%# Eval("IstructionsPageName") + "?MatchId=" + Eval("MatchId")%>'
                        ToolTip='<%# Eval("ShowAssignInstructionsString") %>'
                        Visible='<%# Eval("InstructionsVisible") %>'/>--%>
                        <asp:ImageButton ID="AssignInstructionsLinkButton" runat="server" 
                        ImageUrl='<%# Eval("InstructionIconName", "~/Images/Icons/{0}") %>' 
                        PostBackUrl='<%# "~/MatchInstructions_New.aspx?MatchId=" + Eval("MatchId") %>'
                        ToolTip='<%# Eval("ShowAssignInstructionsString") %>'
                        Visible='<%# Eval("InstructionsVisible") %>'/>
                    </ItemTemplate>
                </asp:TemplateField>            
                <asp:TemplateField ItemStyle-Width="4%">
                    <ItemTemplate>
                        <asp:ImageButton ID="BookmarkLinkButton1" runat="server" OnClientClick="<%$ Resources:Resource, TeamFutureMatches_BookmarkLinkButton1OnClientClick %>"
                            CommandArgument="<%#((GridViewRow) Container).RowIndex %>" CommandName="BookmarkMatch"  Visible='<%# IsAllowBookMark() %>'
                            ImageUrl="~/Images/bookmarks.png"></asp:ImageButton>
                    </ItemTemplate>
                </asp:TemplateField>
            </Columns>
            <PagerStyle HorizontalAlign="Left" VerticalAlign="Top" Wrap="False" />
            <EmptyDataTemplate>
            </EmptyDataTemplate>
        </asp:GridView>
        <asp:SqlDataSource ID="UpcomingMatchesSqlDataSource" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
            SelectCommand="Nivdal_GetUpcomingMatches" SelectCommandType="StoredProcedure">
        </asp:SqlDataSource>
        <asp:SqlDataSource ID="ShowStadiumsValuesSqlDataSource" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
            SelectCommand="Nivdal_GetStadiumsDDLForMatch" SelectCommandType="StoredProcedure">
        </asp:SqlDataSource>
        <asp:SqlDataSource ID="StadiumsCostSQLDataSourse" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
            SelectCommand="Nivdal_GetStadumCostsForMatch" SelectCommandType="StoredProcedure">
        </asp:SqlDataSource>
        <br />
        <asp:LinkButton ID="MatchesLinkButton" runat="server" Text="<%$ Resources:Resource, TeamFutureMatches_MatchesLinkButton %>" SkinID="TitleLink"></asp:LinkButton>
        <br />
        <asp:LinkButton ID="TeamHomePageLinkButton" runat="server" Text="<%$ Resources:Resource, Global_TeamHomePage %>" SkinID="TitleLink"></asp:LinkButton>    
    </div></div>
</asp:Content>

